package com.zygh.lz.controller;

import com.alibaba.fastjson.JSONObject;
import com.zygh.lz.entity.Hierarchytype;
import com.zygh.lz.service.HierarchytypeService;
import com.zygh.lz.stapprove.ResultUtil;
import com.zygh.lz.vo.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HierarchytypeController {
    /*@Autowired
    private HierarchytypeService hierarchytypeService;

    @PostMapping("findHierarchytypeAll")
    public ResultBean findHierarchytypeAll(@RequestBody Integer id) {
        return ResultUtil.setOK("success", hierarchytypeService.findHierarchytypeAll(id));
    }

    @ApiOperation("新增二级特殊勤务类型")
    @PostMapping("addHierarchytype")
    public ResultBean addHierarchytype(@RequestBody Hierarchytype hierarchytype) {
        return ResultUtil.setOK("success", hierarchytypeService.addHierarchytype(hierarchytype));
    }

    @ApiOperation("删除二级特殊勤务类型")
    @PostMapping("deletHierarchytype")
    public ResultBean deletHierarchytype(@RequestBody String id) {
        String str = JSONObject.parseObject(id).get("id").toString();
        Integer new_id = Integer.parseInt(str);
        return ResultUtil.setOK("success", hierarchytypeService.deletHierarchytype(new_id));
    }

    @ApiOperation("修改二级特殊勤务类型")
    @PostMapping("updateHierarchytype")
    public ResultBean updateHierarchytype(@RequestBody Hierarchytype hierarchytype) {
        return ResultUtil.setOK("success", hierarchytypeService.updateHierarchytype(hierarchytype));
    }
*/



}
